Natural Gas Pipelines
Contents
Natural Gas Pipelines¶
Data Import¶
import pandas as pd
import matplotlib.pyplot as plt
import geopandas as gpd
import folium
import contextily as cx
import rtree
from zlib import crc32
import hashlib
from shapely.geometry import Point, LineString, Polygon
/Users/jnapolitano/venvs/finance/lib/python3.9/site-packages/geopandas/_compat.py:111: UserWarning: The Shapely GEOS version (3.10.2-CAPI-1.16.0) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.
warnings.warn(
Natural Gas Pipeline Data¶
## Importing our DataFrames
#gisfilepath = "/Users/jnapolitano/Projects/data/energy/Natural_Gas_Pipelines.geojson"
gisfilepath = '/Users/jnapolitano/Projects/data/energy/Natural_Gas_Liquid_Pipelines.zip'
ng_pipeline_df = gpd.read_file(gisfilepath)
ng_pipeline_df = ng_pipeline_df.to_crs(epsg=3857)
#uniqe = ng_market_df.TYPE.unique()
ng_pipeline_df.dropna(inplace=True)
ng_pipeline_df.describe()
| Shape_Leng | |
|---|---|
| count | 33643.000000 |
| mean | 0.141669 |
| std | 5.455210 |
| min | 0.000000 |
| 25% | 0.017489 |
| 50% | 0.056064 |
| 75% | 0.136343 |
| max | 1000.000000 |
Natural Gas Pipeline Map¶
ng_pipeline_map =ng_pipeline_df.explore(
column="TYPEPIPE", # make choropleth based on "PORT_NAME" column
popup=False, # show all values in popup (on click)
tiles="Stamen Terrain", # use "CartoDB positron" tiles
cmap='Reds',
#m=ng_market_map,# use "Set1" matplotlib colormap
#style_kwds=dict(color="black"),
#marker_kwds= dict(radius=6),
tooltip=['TYPEPIPE','Operator'],
legend =False, # use black outline)
categorical=True,)
ng_pipeline_map
Make this Notebook Trusted to load map: File -> Trust Notebook